from flask import Flask,url_for

app = Flask(__name__)

@app.route('/')
def index():
    return 'Hello'

@app.route('/test')
def test():
    return url_for('user.index')

from user import user_bp
app.register_blueprint(user_bp,url_prefix='/user')

if __name__ == '__main__':
    #设置路由映射的服务器域名和端口
    app.config['SERVER_NAME'] = 'sxt.com:5000'
    app.run(debug=True)